The invention relates to a three-dimensional graphics rendering apparatus and method that are ideal for rendering images of three-dimensional objects in response to three-dimensional graphics data transferred via a data rate-limited network such as the World Wide Web, or other data rate-limited medium. The invention relates in particular to a three-dimensional graphics rendering apparatus and method that substantially instantly generate a low-resolution version of the image of the three-dimensional object, and then successively re-generate versions of the image with progressively-increasing resolutions until a version of the image having optimum resolution is generated.
With the spread of graphics programming languages such as VRML (Virtual Reality Modeling Language), three-dimensional graphics data data representing three-dimensional graphics can easily be transmitted via networks such as the Internet.
Three-dimensional graphics data (3D graphics data) typically include polygon data and color data. The polygon data indicate the positions of the vertices of polygons defining the surfaces of three-dimensional objects (3D objects) located in a virtual three-dimensional space (3D space). The appearance of each polygon can be defined by one of two types of data, direct color data and texture data. Direct color data indicate a color value assigned to the polygon. Texture data define the texture color values of the pixels of a texture pasted onto the polygon.
In three-dimensional graphics processing, each 3D object in 3D space is projected onto a hypothetical two-dimensional surface in a manner that corresponds to the distance and angle between a hypothetical point and the 3D object. In this disclosure, the hypothetical two-dimensional surface will be called a rendering screen, and the hypothetical point will be called a viewpoint. Then, hidden surface removal is performed so that color values are assigned only to the parts of the 3D object visible from the view point. Furthermore, when needed, the color values of the parts of the 3D object visible from the view point may be modified using intensity coefficients that take account of the position and intensity of one or more light sources.
The direct color data assigned to a polygon are usually composed of three color values, one for each of the three primary additive colors, red, green and blue. Red, green and blue will be abbreviated as R, G and B. Similarly, the texture data defining a pixel of a texture pasted onto one or more polygons is usually composed of three color values, one for each of the three primary additive colors, red, green and blue. Color values for different colors, such as yellow, cyan, magenta and black, can alternatively be used. Moreover, other ways of expressing the appearance of an object, such a luminance and color difference values, can alternatively be used as the color values.
If direct color data assigned to polygons are used to define the color to the surfaces of the 3D object, the direct color data define only one color for each polygon. Therefore, when the surface of the 3D object has a complex appearance, even though its topology may be simple, the surface of the object must be divided into many small polygons to enable its appearance to be defined accurately. Increasing the number of polygons means that very many data are involved in the geometry calculations. This significantly reduces the rendering speed.
Textures are used to overcome the problem just described. A texture can be used to define the appearance of the entire surfaces of a 3D object, or large portions of such surfaces. A texture is normally a bitmapped image of the appearance of the surface, and is pasted onto the surface of the polygon. A texture can define the appearance of the surface of the object in fine detail using a relatively small amount of data. A texture can not only define the appearance of repetitive patterns such as brick walls or marble pillars using only a few polygons but can also define an image or a part of an image applied to the surface of the object.
When a texture is pasted onto a polygon, the texture data defining the appearance of the texture must be transformed to correspond to the distance and angle between the view point and the polygon. Normally, this transformation is performed by specifying the coordinates of the vertices of the polygon and by additionally specifying one or more coordinate transform matrices.
Using textures to define the appearance of an object using even conventional rendering techniques provides the advantage of being able to define complex patterns on the surfaces of 3D objects using a small number of polygons as described above. However, the texture data may constitute a substantial number of data, especially when the textures are complex.
When 3D graphics data including texture data are loaded from a server to a client computer through a network, the user may have to wait before an image is displayed. In particular, when 3D graphics processing is performed in a conventional network environment, all of the 3D graphics data, i.e., the polygon data and color data, which include the texture data, must be loaded before any of the rendering calculations start. The time required to load the 3D graphics data may be inconveniently long when the appearance of the 3D objects is defined by complex textures, and a large number of texture data must be downloaded to define the textures. As a result, the latency period, during which nothing is displayed on the screen, may be unacceptably long, and fast rendering is impossible.
Techniques are known for providing two-dimensional graphics data in a special format that enables normal two-dimensional graphics images to be rendered at progressively higher resolutions. In other words, a low-resolution image is initially displayed. The image is then sequentially re-displayed in progressively finer resolutions. One of these display techniques is sold under the trademark FLASHPIX and will be described in more detail below.
However, conventional techniques for rendering images in response to two-dimensional graphics data cannot be applied without modification when textures are mapped onto polygons to represent three-dimensional objects. This is because the textures must be transformed in accordance with the positions of one or more light sources and to take account of the orientation of the polygon relative to the view point, as described above.
Accordingly, what is needed is a three-dimensional graphics rendering apparatus and method capable of rendering an image of a 3D object in a 3D space at high speed and with a resolution that is optimized for each part of the 3D object.
What is also needed is a three-dimensional graphics rendering apparatus and method capable of immediately and rapidly rendering a low-resolution image of the 3D-object and, particularly in a network environment, capable of sequentially re-displaying the image of the 3D-object in progressively finer resolutions as the display time elapses.
Finally, what is needed is a three-dimensional graphics rendering apparatus and method capable of providing effective use of various computational resources by more efficiently loading the texture data related to the actual resolutions in which the various parts of the image are displayed.
The rendering apparatus according to the invention renders an image in response to three-dimensional graphics data, and comprises a data input path, a reference buffer and a rendering engine. The rendering apparatus receives the three-dimensional graphics data through the data input path. The three-dimensional graphics data include polygon data and texture data. The texture data define a texture and include texture size data and pattern data. The pattern data represent multiple instances of the texture. Each instance has a different resolution. The pattern data constitute a significant majority of the texture data. The rendering apparatus initially receives no more than the polygon data, the texture size data and the pattern data representing the lowest-resolution instance of the texture via the data input path.
The reference buffer includes memory cells corresponding to the pixels of a rendering screen.
The rendering engine performs an initial rasterizing operation using only the polygon and texture size data to generate and store in each of the memory cells of the reference buffer texture coordinates for a corresponding one of the pixels of the rendering screen. The rendering engine additionally repetitively performs a display-and-load operation until either color values of all the pixels of the rendering screen are generated using different ones of the pattern data then extant in the rendering apparatus, or the pattern data representing at least part of the highest-resolution instance of the texture have been loaded. In the display-and-load operation, the rendering engine generates color values, identifies the pattern data of a next-higher resolution instance of the texture required to render at least parts of the image with a higher resolution, and causes the pattern data identified as being required to render the at least parts of the image with the higher resolution to be loaded via the path. The rendering engine generates the color values using the pattern data of the highest-resolution instance of the texture then extant in the rendering apparatus. The rendering engine identifies the pattern data of the next-higher resolution instance of the texture in response to the texture coordinates stored in the reference buffer.
The rendering apparatus may additionally comprise a texture memory in which the pattern data loaded via the data input path are stored in a pyramidal data structure. The pyramidal data structure includes layers in which are stored the pattern data of respective ones of the instances of the texture.
The invention also provides a method of rendering an image represented by color values corresponding to pixels of a rendering screen in response to three-dimensional graphics data. The three-dimensional graphics data include polygon data and texture data. The texture data define a texture and include texture size data and pattern data. The pattern data represent multiple instances of the texture. Each instance has a different resolution. The pattern data constitute a significant majority of the texture data. In the method, the polygon data, the texture size data and the pattern data representing the lowest-resolution instance of the texture are initially loaded. An initial rasterizing operation is performed using the polygon data and texture size data to generate and to store a texture identifier and texture coordinates for each pixel of the rendering screen. A display-and-load operation is repetitively performed until either the color values of all the pixels of the rendering screen are generated using different ones of the pattern data, or the pattern data of at least part of the highest-resolution instance of the texture have been loaded. In the display-and-load operation, the color values representing the image are generated using the pattern data of a highest-resolution instance of the texture previously loaded. In response to the texture coordinates stored for the rendering screen pixels, the pattern data of a next-higher resolution instance of the texture required to render at least parts of the image with a higher resolution are identified, and the identified pattern data are loaded.
By only initially loading the polygon data, the texture size data and the pattern data representing the lowest-resolution instance of the texture, the apparatus and method according to the invention generate the image data representing a low-resolution versions of the image with substantially no delay. The image data representing higher-resolution versions of the image are subsequently generated. However, the image data representing the higher-resolution versions of the image may be generated more rapidly than by a conventional apparatus or method because the apparatus and method according to the invention load only the pattern data required to generate the image data that represent the image with optimum resolution. Thus, the pattern data for those parts of the image that do not need the higher-resolution instances of the texture to be rendered with optimum resolution are not loaded.